/*
 * @Author: yushuang
 * @Date: 2024-12-24 11:41:00
 * @LastEditors: yushuang
 * @LastEditTime: 2025-01-24 11:36:35
 * @Description:
 */
import { createRouter, createWebHistory } from 'vue-router';
import staticRoutes from './static-routes';
import pkg from '../../package.json';
import dynamicRoutes from './dynamic-routes';

const router = createRouter({
  // 这个需要与主应用中注册的微应用的name一致
  history: createWebHistory(`/${pkg.name}`),
  routes: [...staticRoutes, ...dynamicRoutes],
  strict: false,
  scrollBehavior: () => ({ left: 0, top: 0 })
});

export default router;
